package com.czh.rdm.chat_4

open class BaseClass(
    val username: String,
    val password: String,
)

class RealClass : BaseClass {
    constructor(username: String, password: String) : super(username, password) {
    }
}

class RealClassV2 : BaseClass(username="admin", password="admin") {

}

open class BaseModel {
    val username: String
    constructor(username: String) {
        this.username = username
    }
}

class RealModel: BaseModel {
    constructor(): super("hello")
    fun hello() {
        println(this.username)
    }
}

fun main(array: Array<String>) {
    val r1 = RealClass(username="admin", password="admin")
    val r2 = RealClassV2()
    println(r1.username)
    println(r2.username)

    val model = RealModel()
    model.hello()
}